'''继承'''
class Person:
    def __init__(self, name, age):
        self.name = name
        self.age = age
    def introduct(self):
        print('我是',self.name,'今年',self.age,'岁',end='\t')
class Student(Person):#这就是继承，如果是多继承的话 class Student(Person,teacher)
    def __init__(self, name, age, classId):
        super().__init__(name,age) #子类的构造返回必须调用父类的构造函数
        self.classId = classId
    '''进行重写'''
    def introduct(self):
        super().introduct()
        print(self.classId)
person =Person('张三',19)
student=Student('张三','19','三班')
student.introduct()
